RANGER-5429: update unit tests for getResourceACLs() to validate policyID - #772
Merged
Conversation
mneethiraj
requested review from
Copilot,
kishorgollapalliwar,
kulkabhay,
kumaab,
pradeepagrawal8184,
rameeshm,
spolavarpau1 and
vperiasamy
December 24, 2025 01:18
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request enhances the unit test suite for RangerPolicyEngine.getResourceACLs() by adding validation for policy IDs returned in ACL results, improving test data readability, and refining comparison logic for AccessResult objects.
Key changes:
- Updated test JSON files to include expected policy IDs in ACL results
- Added default constructors for
DataMaskResultandRowFilterResultto support deserialization - Enhanced
AccessResult.equals()to compare policy IDs alongside result and finality - Initialized test data structures to avoid null values in test assertions
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
test_aclprovider_resource_hierarchy_tags.json |
Reformatted for readability and added policy ID validation to all ACL test cases |
test_aclprovider_mask_filter.json |
Reformatted and removed unnecessary empty arrays from test expectations |
test_aclprovider_hdfs.json |
Reformatted and added policy ID validation for group permissions |
test_aclprovider_default.json |
Reformatted and added comprehensive policy ID validation across all test scenarios |
test_gds_policy_hive_row_filter.json |
Added policy ID validation to all user ACL assertions |
test_gds_policy_hive_data_mask.json |
Added policy ID validation and removed unused userGroups fields from test requests |
test_gds_policy_hive_access.json |
Added policy ID validation to ACL test cases |
test_base_plugin_hive.json |
Updated expected policy IDs to match actual policy evaluation results |
TestPolicyACLs.java |
Initialized test data structures with empty collections to prevent null pointer issues |
RangerResourceACLs.java |
Enhanced AccessResult comparison to include policy ID; added default constructors for test data deserialization |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
pradeepagrawal8184
approved these changes
Dec 31, 2025
vyommani
pushed a commit
to vyommani/ranger
that referenced
this pull request
Jan 2, 2026
bhaveshamre
pushed a commit
to bhaveshamre/ranger
that referenced
this pull request
Jan 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
TestPolicyACLsto validate policy ID returned in calls toRangerPolicyEngine.getResourceACLs().How was this patch tested?
All unit tests complete successfully.